<template>
  <div id="app">
    <div id="loading-box" v-if="loading.show">
      <i class="el-icon-loading"></i>
      <span>{{ loading.msg }}</span>
    </div>
    <div class="pagess">
      <div
        class="item"
        :class="{ active: routeName == item.name }"
        v-for="(item, index) in pages"
        :key="index"
        @click="$router.push({ name: item.name })"
      >
        {{ item.title }}
      </div>
    </div>
    <router-view />
  </div>
</template>

<script>
import { mapState } from "vuex";

export default {
  computed: {
    ...mapState("loading", ["loading"]),
    routeName() {
      return this.$route.name;
    },
  },
};
</script>

<style lang="scss">
@font-face {
  font-family: "pingFangSC";
  src: url("./assets/PingFangSC-Regular.ttf"); //你的资源目录
  font-weight: normal;
  font-style: normal;
}
#shop-link-temp {
  display: none;
}
.pagess {
  position: fixed;
  z-index: 999;
  left: -130px;
  width: 120px;
  padding: 10px;
  background: pink;
  border-radius: 5px;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s;
  &:hover {
    left: 0;
  }
  .item {
    width: 100%;
    text-align: center;
    line-height: 34px;
    cursor: pointer;
    &:hover,
    &.active {
      background: red;
      color: #fff;
    }
  }
}
.flex {
  flex: 1;
}
body,
html {
  padding: 0;
  margin: 0;
  background: #f6f6f8;
  font-family: pingFangSC, Helvetica, Arial, sans-serif;
}
#app {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #333;
  .flex {
    flex: 1;
  }
  .el-checkbox__inner {
    width: 16px;
    height: 16px;
    &::after {
      left: 5px;
      top: 2px;
    }
  }
}

#loading-box {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999999;
  i {
    font-size: 50px;
    color: #fff;
  }
  span {
    font-size: 14px;
    color: #fff;
  }
}

.OrderCreate {
  .el-step__icon {
    width: 36px !important;
    height: 36px !important;
    background: #ea968d !important;
    border: none !important;
    color: #fff !important;
    margin-bottom: 18px;
  }
  .el-step__line {
    height: 4px !important;
  }
  .el-step__title.is-finish {
    color: #d52c1a !important;
    font-weight: 600;
  }
  .el-step__title {
    font-size: 16px !important;
    color: #333333 !important;
    line-height: 22px !important;
  }
  .is-finish {
    .el-step__icon {
      width: 36px !important;
      height: 36px !important;
      background: #d52c1a !important;
      border: none !important;
      color: #fff !important;
    }
    .el-step__line {
      background-color: #d52c1a !important;
    }
  }
  .el-step__line {
    top: 16px !important;
  }
}

input,
button {
  outline: none;
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
  &::-webkit-outer-spin-button,
  &::-webkit-inner-spin-button {
    -webkit-appearance: none;
  }
}

.loading-message {
  min-width: 0px !important;
  // padding: 10px 10px 10px 15px !important;
  .el-message__content {
    padding: 0 10px;
  }
}
</style>
